package com.ruiaa.meeting.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @author chenhuaiyi
 * @date 2022-11-05 15:17
 */
@Data
@TableName("reservation")
public class Reservation {

    @TableId(type = IdType.AUTO)
    @TableField(value = "reserve_id")
    private Integer reserveId;

    @NotNull(message = "roomId不能为空")
    private Integer roomId;

    @NotNull(message = "预约用户不能为空")
    private String username;

    @TableField(value = "reserve_time")
    private LocalDateTime reserveTime;

    @NotNull(message = "开始时间不能为空")
    @TableField(value = "start_time")
    private LocalDateTime startTime;

    @NotNull(message = "结束时间不能为空")
    @TableField(value = "end_time")
    private LocalDateTime endTime;

    private Integer state;
}
